<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="lijinbo" />
    <meta name="cdnload" content="typewriter-js" />
    <title>打字机JS</title>
  </head>
  <body>
    <p>
      <a href="https://www.npmjs.com/package/typewriter" target="_blank"> typewriter npm </a>
    </p>
    <div id="asklz"></div>
    <script>
      var app = document.getElementById('asklz')
      var typewriter = new Typewriter(asklz, {
        loop: true
      })
      typewriter
        .typeString('打字机 JS 示例')
        .pauseFor(2500)
        .deleteAll()
        .typeString('该说些什么呢？')
        .pauseFor(2500)
        .typeString('让我好好想想..')
        .deleteAll()
        .typeString('有了！')
        .pauseFor(2500)
        .deleteAll()
        .typeString('其实，我挺帅的')
        .pauseFor(2500)
        .deleteChars(3)
        .typeString('很谦虚!')
        .start()
    </script>
  </body>
</html>
